package com.elastic.inis;

import com.elastic.ESMajorManage;
import com.elastic.chain.ChooseQuery;
import com.elastic.chain.FinalLeader;
import com.elastic.chain.Leader;
import com.elastic.exceptions.ESException;

/**
 * @ClassName BuilderManage
 * @Author xiezhuocai
 * @Description TODO
 * @Date 2021/12/30 10:30
 */
public abstract class BuilderManage {

    protected ESProduct esProduct;

    public abstract void buildFinalLeader();
    public abstract void buildLeader();
    public abstract void buildChooseQuery();

    public ESMajorManage buildESProduct() {
        if (esProduct !=null && esProduct.isInit()){
            return esProduct.getMajorManage();
        }
        throw  new ESException("build失败");
    }

}
